#include <string>
#include <iostream>
#include <sstream>

#include "baseToken.h"
#include "basePlayer.h"

class basePlayer;

using namespace std;

baseToken::baseToken(string aColor, basePlayer *aOwner) : color(aColor), owner(aOwner), value(tokenValue){}
baseToken::baseToken(string aColor, basePlayer *aOwner, int aValue) : color(aColor), owner(aOwner), value(aValue){}

string baseToken::getColor()
{
    return this->color;
}

int baseToken::getValue()
{
    return this->value;
}

basePlayer* baseToken::getOwner()
{
    return this->owner;
}

string baseToken::toString()
{
    stringstream out;

    out << getColor() << " " << getValue();

    return out.str();
}

void baseToken::toString(ostream &out)
{
    out << toString();
}

void baseToken::toString(string &str)
{
    str = str + toString();
}

bool baseToken::operator== (baseToken aBaseToken)
{
    return 0 == color.compare(aBaseToken.getColor());
}
